﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="ThuongHieuEdit.aspx.cs" Inherits="ThuongHieuEdit" Title="ThuongHieu Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Thuong Hieu - Add/Edit</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="BrandId" runat="server" DataSourceID="ThuongHieuDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/ThuongHieuFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/ThuongHieuFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>ThuongHieu not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:ThuongHieuDataSource ID="ThuongHieuDataSource" runat="server"
			SelectMethod="GetByBrandId"
		>
			<Parameters>
				<asp:QueryStringParameter Name="BrandId" QueryStringField="BrandId" Type="String" />

			</Parameters>
		</data:ThuongHieuDataSource>
		
		<br />

		<data:EntityGridView ID="GridViewKhachHangDuthuong" runat="server"
			AutoGenerateColumns="False"					
			OnSelectedIndexChanged="GridViewKhachHangDuthuong_SelectedIndexChanged"			 			 
			DataSourceID="KhachHangDuthuongDataSource"
			DataKeyNames="Id"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_KhachHangDuthuong.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="HoiVienId" HeaderText="Hoi Vien Id" SortExpression="HoiVienID" />				
				<asp:BoundField DataField="Duration" HeaderText="Duration" SortExpression="Duration" />				
				<asp:BoundField DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" />				
				<asp:BoundField DataField="EndDate" HeaderText="End Date" SortExpression="EndDate" />				
				<asp:BoundField DataField="IsActive" HeaderText="Is Active" SortExpression="IsActive" />				
				<asp:BoundField DataField="LoaiSanPham" HeaderText="Loai San Pham" SortExpression="LoaiSanPham" />				
				<asp:BoundField DataField="MucChietKhauTd" HeaderText="Muc Chiet Khau Td" SortExpression="MucChietKhauTD" />				
				<asp:BoundField DataField="MucChietKhauCc" HeaderText="Muc Chiet Khau Cc" SortExpression="MucChietKhauCC" />				
				<asp:BoundField DataField="UpdatedDate" HeaderText="Updated Date" SortExpression="UpdatedDate" />				
				<asp:BoundField DataField="UpdatedBy" HeaderText="Updated By" SortExpression="UpdatedBy" />				
				<asp:BoundField DataField="SoBienBan" HeaderText="So Bien Ban" SortExpression="SoBienBan" />				
				<asp:BoundField DataField="NgayKyBienBan" HeaderText="Ngay Ky Bien Ban" SortExpression="NgayKyBienBan" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Khach Hang Duthuong Found! </b>
				<asp:HyperLink runat="server" ID="hypKhachHangDuthuong" NavigateUrl="~/admin/KhachHangDuthuongEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:KhachHangDuthuongDataSource ID="KhachHangDuthuongDataSource" runat="server" SelectMethod="Find">
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:KhachHangDuthuongFilter  Column="BrandId" QueryStringField="BrandId" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:KhachHangDuthuongDataSource>		
		
		<br />
		

</asp:Content>

